﻿<%@ Page Title="" Language="C#" MasterPageFile="~/administrator/backend.Master" AutoEventWireup="true" CodeBehind="tabletime-add.aspx.cs" Inherits="VQWEB.administrator.english.tabletime.tabletime_add" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Content_backend" runat="server">
    <form id="frm_tabletime" runat="server" role="form">
    <asp:FormView ID="frmTableTime" runat="server" RenderOuterTable="false">
        <EditItemTemplate>
            <div class="form-group">
                <label>
                    Contact Address</label>
                <input class="form-control" name="contact_address" type="text" value='<%# Eval("contact_address") %>' />
            </div>
            <div class="form-group">
                <label>
                    FullName</label>
                <input class="form-control" name="contact_fullname" type="text" value='<%# Eval("contact_fullname") %>' />
            </div>
            <div class="form-group">
                <label>
                    Content</label>
                <textarea class="form-control" name="contact_content" rows="3"><%# Eval("contact_content") %></textarea>
            </div>
            <div class="checkbox">
                <label>
                    <input <%# Eval("contact_active") !=null && (bool)(Eval("contact_active")) ? " checked='checked'" : null %>=""
                        name="contact_active" type="checkbox" value="True" />
                    Active
                </label>
            </div>
            <input name="contact_id" type="hidden" value='<%# (Eval("contact_id") != null) ? Eval("contact_id") : "0" %>' />
        </EditItemTemplate>
    </asp:FormView>
    </form>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Script_backend" runat="server">
    <script type="text/javascript">
        ShowToolBar("edit");
        var url_ashx = "/admin/english/tabletime/handler";
        $("#btnCancel").live("click", function () {
            window.location = "/admin/english/tabletime/list";
        });
        $("#btnSave").live("click", function () {
            var arr = $("#frm_tabletime").serializeObject();
            $.post(url_ashx, { add_tabletime: window.escape(arr) }, function (data) {
                alert(data);
                window.location = "/admin/english/tabletime/list";
            });
        });
    </script>
</asp:Content>
